package com.ngmaster.apiserver.controller;

import com.ngmaster.apiserver.common.BaseApiResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

@RestController
@Api(tags = "版本控制")
@ResponseBody
@CrossOrigin
@RequestMapping("/version")
@Slf4j
public class VersionController {


    @ApiOperation(value = "健康检查", notes = "健康检查")
    @ApiResponse(code = 200, message = "OK", response = BaseApiResponse.class)
    @GetMapping("get")
    public BaseApiResponse modifyHostPort() {
        warn(String.valueOf(System.currentTimeMillis()));
        return BaseApiResponse.of().withResultSuccess();
    }

    private void warn(String formatter) {
        log.warn("ReceivedVersionRequest:" + formatter);
    }

}
